﻿@model WarOfDev.EF.Permission

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Permission</legend>

        @Html.HiddenFor(model => model.Id)

        <div class="editor-label">
            @Html.LabelFor(model => model.ModuleId, "Module")
        </div>
        <div class="editor-field">
            @Html.DropDownList("ModuleId", String.Empty)
            @Html.ValidationMessageFor(model => model.ModuleId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PermissionName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PermissionName)
            @Html.ValidationMessageFor(model => model.PermissionName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PermissionValue)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PermissionValue)
            @Html.ValidationMessageFor(model => model.PermissionValue)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.IsLocked)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.IsLocked)
            @Html.ValidationMessageFor(model => model.IsLocked)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CreatedOn)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CreatedOn)
            @Html.ValidationMessageFor(model => model.CreatedOn)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CreatedBy)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CreatedBy)
            @Html.ValidationMessageFor(model => model.CreatedBy)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ModifiedOn)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ModifiedOn)
            @Html.ValidationMessageFor(model => model.ModifiedOn)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ModifiedBy)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ModifiedBy)
            @Html.ValidationMessageFor(model => model.ModifiedBy)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
